package com.quwan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.quwan.constans.CacheKey;
import com.quwan.entity.TProductCategory;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * @author quan
 * @date 2021-08-03 14:18
 */

@CacheConfig(cacheNames = CacheKey.DATA.cates)
public interface TProductCategoryMapper extends BaseMapper<TProductCategory> {
    Page<Map<String, Object>> selectCateTagList(Page<Map<String, Object>> page, @Param("id") String id, @Param("caption") String caption, @Param("cateType") Integer cateType, @Param("beginTime") LocalDate beginTime, @Param("endTime") LocalDate endTime);

    @Cacheable
    List<TProductCategory> selectAll();

}